﻿using System;
using Rio.Framework.Pages.UserControls;
using Rio.Framework.Pages.AppCode.Events;
using Rio.Framework.Pages.AppCode.Models;

namespace Rio.Framework.Pages.CriteriaControls.BaseClass
{
    public class ItemTreeviewBase : ControlBase
    {

        #region Events

        public event TreeItemEventEventHandler ItemChanged;
        protected void RaiseTreeItemChanged(DataItemTreeView item)
        {
            if (ItemChanged != null)
                ItemChanged(this, new TreeItemEventArgs() { CurrentSelectedItem = item });
        }

        public event TreeItemEventEventHandler ItemDblClicked;
        protected void RaiseItemDblClicked(DataItemTreeView item)
        {
            if (ItemDblClicked != null)
                ItemDblClicked(this, new TreeItemEventArgs() { CurrentSelectedItem = item });
        }

        #endregion

    }
}
